package gyw.spring.cloud.client_feign.feign.config;

import feign.Retryer;
import org.springframework.cloud.client.ConditionalOnBlockingDiscoveryEnabled;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

import static java.util.concurrent.TimeUnit.SECONDS;

/**
 * TODO
 *
 * @author 关彦武
 * @date 2020/6/9 17:08
 */
@Configuration
public class FeignConfig {
    @Bean
    public Retryer feignRetryer(){
       return new Retryer.Default (100,TimeUnit.SECONDS.toMillis(1),5);
    }
}
